Optimal. Leaf size=113 \[ \frac {2 E\left (\left .\frac {1}{2} (c+d x)\right |6\right ) \sqrt {3-2 \sec (c+d x)}}{3 d \sqrt {-2+3 \cos (c+d x)} \sqrt {\sec (c+d x)}}+\frac {4 \sqrt {-2+3 \cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |6\right ) \sqrt {\sec (c+d x)}}{3 d \sqrt {3-2 \sec (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, antiderivative size = 113, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3947, 3941,
2732, 3943, 2740} \begin {gather*} \frac {4 \sqrt {3 \cos (c+d x)-2} \sqrt {\sec (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |6\right )}{3 d \sqrt {3-2 \sec (c+d x)}}+\frac {2 \sqrt {3-2 \sec (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |6\right )}{3 d \sqrt {3 \cos (c+d x)-2} \sqrt {\sec (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2732
Rule 2740
Rule 3941
Rule 3943
Rule 3947
Rubi steps
\begin {align*} \int \frac {1}{\sqrt {3-2 \sec (c+d x)} \sqrt {\sec (c+d x)}} \, dx &=\frac {1}{3} \int \frac {\sqrt {3-2 \sec (c+d x)}}{\sqrt {\sec (c+d x)}} \, dx+\frac {2}{3} \int \frac {\sqrt {\sec (c+d x)}}{\sqrt {3-2 \sec (c+d x)}} \, dx\\ &=\frac {\sqrt {3-2 \sec (c+d x)} \int \sqrt {-2+3 \cos (c+d x)} \, dx}{3 \sqrt {-2+3 \cos (c+d x)} \sqrt {\sec (c+d x)}}+\frac {\left (2 \sqrt {-2+3 \cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {-2+3 \cos (c+d x)}} \, dx}{3 \sqrt {3-2 \sec (c+d x)}}\\ &=\frac {2 E\left (\left .\frac {1}{2} (c+d x)\right |6\right ) \sqrt {3-2 \sec (c+d x)}}{3 d \sqrt {-2+3 \cos (c+d x)} \sqrt {\sec (c+d x)}}+\frac {4 \sqrt {-2+3 \cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |6\right ) \sqrt {\sec (c+d x)}}{3 d \sqrt {3-2 \sec (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.08, size = 72, normalized size = 0.64 \begin {gather*} \frac {\sqrt {-2+3 \cos (c+d x)} \left (2 E\left (\left .\frac {1}{2} (c+d x)\right |6\right )+4 F\left (\left .\frac {1}{2} (c+d x)\right |6\right )\right ) \sqrt {\sec (c+d x)}}{3 d \sqrt {3-2 \sec (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains complex when optimal does not.
time = 1.12, size = 381, normalized size = 3.37
method | result | size |
default | \(\frac {2 \left (3 \sqrt {\frac {-2+3 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sqrt {\frac {1}{1+\cos \left (d x +c \right )}}\, \sqrt {5}\, \EllipticF \left (\frac {\left (-1+\cos \left (d x +c \right )\right ) \sqrt {5}}{\sin \left (d x +c \right )}, \frac {i \sqrt {5}}{5}\right ) \sin \left (d x +c \right ) \cos \left (d x +c \right )-5 \sqrt {\frac {-2+3 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sqrt {\frac {1}{1+\cos \left (d x +c \right )}}\, \sqrt {5}\, \EllipticE \left (\frac {\left (-1+\cos \left (d x +c \right )\right ) \sqrt {5}}{\sin \left (d x +c \right )}, \frac {i \sqrt {5}}{5}\right ) \sin \left (d x +c \right ) \cos \left (d x +c \right )+3 \EllipticF \left (\frac {\left (-1+\cos \left (d x +c \right )\right ) \sqrt {5}}{\sin \left (d x +c \right )}, \frac {i \sqrt {5}}{5}\right ) \sqrt {5}\, \sqrt {\frac {-2+3 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sqrt {\frac {1}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )-5 \EllipticE \left (\frac {\left (-1+\cos \left (d x +c \right )\right ) \sqrt {5}}{\sin \left (d x +c \right )}, \frac {i \sqrt {5}}{5}\right ) \sqrt {5}\, \sqrt {\frac {-2+3 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sqrt {\frac {1}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )-15 \left (\cos ^{2}\left (d x +c \right )\right )+25 \cos \left (d x +c \right )-10\right ) \sqrt {\frac {-2+3 \cos \left (d x +c \right )}{\cos \left (d x +c \right )}}}{15 d \sqrt {\frac {1}{\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \left (-2+3 \cos \left (d x +c \right )\right )}\) | \(381\) |
risch | \(-\frac {i \left (3 \,{\mathrm e}^{2 i \left (d x +c \right )}-4 \,{\mathrm e}^{i \left (d x +c \right )}+3\right ) \sqrt {2}}{3 d \sqrt {\frac {{\mathrm e}^{i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}}\, \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) \sqrt {\frac {3 \,{\mathrm e}^{2 i \left (d x +c \right )}-4 \,{\mathrm e}^{i \left (d x +c \right )}+3}{{\mathrm e}^{2 i \left (d x +c \right )}+1}}}-\frac {i \left (-\frac {2 \left (3 \,{\mathrm e}^{2 i \left (d x +c \right )}-4 \,{\mathrm e}^{i \left (d x +c \right )}+3\right )}{3 \sqrt {{\mathrm e}^{i \left (d x +c \right )} \left (3 \,{\mathrm e}^{2 i \left (d x +c \right )}-4 \,{\mathrm e}^{i \left (d x +c \right )}+3\right )}}+\frac {\left (-\frac {2}{3}+\frac {i \sqrt {5}}{3}\right ) \sqrt {\frac {{\mathrm e}^{i \left (d x +c \right )}-\frac {2}{3}+\frac {i \sqrt {5}}{3}}{-\frac {2}{3}+\frac {i \sqrt {5}}{3}}}\, \sqrt {30}\, \sqrt {i \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {2}{3}-\frac {i \sqrt {5}}{3}\right ) \sqrt {5}}\, \sqrt {\frac {{\mathrm e}^{i \left (d x +c \right )}}{\frac {2}{3}-\frac {i \sqrt {5}}{3}}}\, \left (-\frac {2 i \sqrt {5}\, \EllipticE \left (\sqrt {\frac {{\mathrm e}^{i \left (d x +c \right )}-\frac {2}{3}+\frac {i \sqrt {5}}{3}}{-\frac {2}{3}+\frac {i \sqrt {5}}{3}}}, \frac {\sqrt {30}\, \sqrt {i \left (\frac {2}{3}-\frac {i \sqrt {5}}{3}\right ) \sqrt {5}}}{10}\right )}{3}+\left (\frac {2}{3}+\frac {i \sqrt {5}}{3}\right ) \EllipticF \left (\sqrt {\frac {{\mathrm e}^{i \left (d x +c \right )}-\frac {2}{3}+\frac {i \sqrt {5}}{3}}{-\frac {2}{3}+\frac {i \sqrt {5}}{3}}}, \frac {\sqrt {30}\, \sqrt {i \left (\frac {2}{3}-\frac {i \sqrt {5}}{3}\right ) \sqrt {5}}}{10}\right )\right )}{5 \sqrt {3 \,{\mathrm e}^{3 i \left (d x +c \right )}-4 \,{\mathrm e}^{2 i \left (d x +c \right )}+3 \,{\mathrm e}^{i \left (d x +c \right )}}}\right ) \sqrt {2}\, \sqrt {{\mathrm e}^{i \left (d x +c \right )} \left (3 \,{\mathrm e}^{2 i \left (d x +c \right )}-4 \,{\mathrm e}^{i \left (d x +c \right )}+3\right )}}{d \sqrt {\frac {{\mathrm e}^{i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}}\, \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) \sqrt {\frac {3 \,{\mathrm e}^{2 i \left (d x +c \right )}-4 \,{\mathrm e}^{i \left (d x +c \right )}+3}{{\mathrm e}^{2 i \left (d x +c \right )}+1}}}\) | \(573\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.83, size = 108, normalized size = 0.96 \begin {gather*} \frac {-4 i \, \sqrt {6} {\rm weierstrassPInverse}\left (-\frac {44}{27}, -\frac {784}{729}, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right ) - \frac {4}{9}\right ) + 4 i \, \sqrt {6} {\rm weierstrassPInverse}\left (-\frac {44}{27}, -\frac {784}{729}, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right ) - \frac {4}{9}\right ) + 9 i \, \sqrt {6} {\rm weierstrassZeta}\left (-\frac {44}{27}, -\frac {784}{729}, {\rm weierstrassPInverse}\left (-\frac {44}{27}, -\frac {784}{729}, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right ) - \frac {4}{9}\right )\right ) - 9 i \, \sqrt {6} {\rm weierstrassZeta}\left (-\frac {44}{27}, -\frac {784}{729}, {\rm weierstrassPInverse}\left (-\frac {44}{27}, -\frac {784}{729}, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right ) - \frac {4}{9}\right )\right )}{27 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\sqrt {3 - 2 \sec {\left (c + d x \right )}} \sqrt {\sec {\left (c + d x \right )}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {1}{\sqrt {3-\frac {2}{\cos \left (c+d\,x\right )}}\,\sqrt {\frac {1}{\cos \left (c+d\,x\right )}}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________